/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package window;

import com.util.R;
import java.awt.Color;
import java.awt.Component;
import javax.swing.JTable;
import javax.swing.table.DefaultTableCellRenderer;

/**
 *
 * @author SDS
 */
public class MyTableRenderer extends DefaultTableCellRenderer {

  @Override
  public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {

        Component cell = super.getTableCellRendererComponent( table, value, isSelected, hasFocus, row, column );

        String val = (String) value;

        if( val != null && val.indexOf(R.readAlready) >= 0 ) {
            setForeground( Color.BLUE );
        } else {
            setForeground( Color.BLACK );
        }

        return cell;
  }


}
